import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';


//列表数据
export const columns: BasicColumn[] = [
   {
    title: '料品编码',
    align:"center",
    dataIndex: 'goodsCode'
   },
   {
    title: '料品名称',
    align:"center",
    dataIndex: 'goodsName'
   },
   {
    title: '料品类别',
    align:"center",
    dataIndex: 'goodsType'
   },
   {
    title: '规格',
    align:"center",
    dataIndex: 'gauge'
   },
   {
    title: '单位',
    align:"center",
    dataIndex: 'unit'
   },
   {
    title: '含税单价',
    align:"center",
    dataIndex: 'taxPrice'
   },
   {
    title: '不含税单价',
    align:"center",
    dataIndex: 'notTaxPrice'
   },
   {
    title: '最低含税价',
    align:"center",
    dataIndex: 'lowTaxPrice'
   },
   {
    title: '最高含税价',
    align:"center",
    dataIndex: 'highTaxPrice'
   },
   {
    title: '保质期',
    align:"center",
    dataIndex: 'period'
   },
   {
    title: '零件号',
    align:"center",
    dataIndex: 'partNumber'
   },
   {
    title: '品牌',
    align:"center",
    dataIndex: 'brand'
   },
   {
    title: '领料员',
    align:"center",
    dataIndex: 'materialMan'
   },
   {
    title: '适用车型',
    align:"center",
    dataIndex: 'suitableType'
   },
   {
    title: 'assemblyType',
    align:"center",
    dataIndex: 'assemblyType'
   },
   {
    title: '供货商编码',
    align:"center",
    dataIndex: 'supplierCode'
   },
   {
    title: '生产产商',
    align:"center",
    dataIndex: 'manufacturer'
   },
   {
    title: '送达天数',
    align:"center",
    dataIndex: 'serviceDays'
   },
   {
    title: '预警天数',
    align:"center",
    dataIndex: 'warningDays'
   },
   {
    title: '最大领用',
    align:"center",
    dataIndex: 'maximumUse'
   },
   {
    title: '是否合同商家',
    align:"center",
    dataIndex: 'isContractMerchant'
   },
   {
    title: '执行方式',
    align:"center",
    dataIndex: 'executionMode'
   },
   {
    title: '是否正常',
    align:"center",
    dataIndex: 'useMark'
   },
   {
    title: '是否交旧件',
    align:"center",
    dataIndex: 'handOld'
   },
   {
    title: '条码类型',
    align:"center",
    dataIndex: 'barCodeType'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
   {
    title: '注册日期时间',
    align:"center",
    dataIndex: 'registrationDate'
   },
   {
    title: '助记码',
    align:"center",
    dataIndex: 'helpCode'
   },
   {
    title: '录入日期',
    align:"center",
    dataIndex: 'inputdate'
   },
   {
    title: '材质',
    align:"center",
    dataIndex: 'material'
   },
   {
    title: '操作员',
    align:"center",
    dataIndex: 'operatorName'
   },
   {
    title: '条码',
    align:"center",
    dataIndex: 'barCode'
   },
   {
    title: '识别id',
    align:"center",
    dataIndex: 'fitMeId'
   },
   {
    title: '存储条件',
    align:"center",
    dataIndex: 'storageConditions'
   },
   {
    title: '安全阈值',
    align:"center",
    dataIndex: 'safetyThreshold'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "料品编码",
      field: 'goodsCode',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "料品名称",
      field: 'goodsName',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "料品类别",
      field: 'goodsType',
      component: 'Input',
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '料品编码',
    field: 'goodsCode',
    component: 'Input'

  },
  {
    label: '料品名称',
    field: 'goodsName',
    component: 'Input',
  },
  {
    label: '料品类别',
    field: 'goodsType',
    component: 'Input',
  },
  {
    label: '规格',
    field: 'gauge',
    component: 'Input',
  },
  {
    label: '单位',
    field: 'unit',
    component: 'Input',
  },
  {
    label: '含税单价',
    field: 'taxPrice',
    component: 'InputNumber',
  },
  {
    label: '不含税单价',
    field: 'notTaxPrice',
    component: 'InputNumber',
  },
  {
    label: '最低含税价',
    field: 'lowTaxPrice',
    component: 'InputNumber',
  },
  {
    label: '最高含税价',
    field: 'highTaxPrice',
    component: 'InputNumber',
  },
  {
    label: '保质期',
    field: 'period',
    component: 'InputNumber',
  },
  {
    label: '零件号',
    field: 'partNumber',
    component: 'Input',
  },
  {
    label: '品牌',
    field: 'brand',
    component: 'Input',
  },
  {
    label: '领料员',
    field: 'materialMan',
    component: 'Input',
  },
  {
    label: '适用车型',
    field: 'suitableType',
    component: 'Input',
  },
  {
    label: 'assemblyType',
    field: 'assemblyType',
    component: 'Input',
  },
  {
    label: '供货商编码',
    field: 'supplierCode',
    component: 'Input',
  },
  {
    label: '生产产商',
    field: 'manufacturer',
    component: 'Input',
  },
  {
    label: '送达天数',
    field: 'serviceDays',
    component: 'InputNumber',
  },
  {
    label: '预警天数',
    field: 'warningDays',
    component: 'InputNumber',
  },
  {
    label: '最大领用',
    field: 'maximumUse',
    component: 'InputNumber',
  },
  {
    label: '是否合同商家',
    field: 'isContractMerchant',
    component: 'Input',
  },
  {
    label: '执行方式',
    field: 'executionMode',
    component: 'Input',
  },
  {
    label: '是否正常',
    field: 'useMark',
    component: 'Input',
  },
  {
    label: '是否交旧件',
    field: 'handOld',
    component: 'Input',
  },
  {
    label: '条码类型',
    field: 'barCodeType',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: '注册日期时间',
    field: 'registrationDate',
    component: 'DatePicker',
    componentProps: {
       showTime: true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '助记码',
    field: 'helpCode',
    component: 'Input',
  },
  {
    label: '录入日期',
    field: 'inputdate',
    component: 'DatePicker',
    componentProps: {
       showTime: true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '材质',
    field: 'material',
    component: 'Input',
  },
  {
    label: '操作员',
    field: 'operatorName',
    component: 'Input',
  },
  {
    label: '条码',
    field: 'barCode',
    component: 'Input',
  },
  {
    label: '识别id',
    field: 'fitMeId',
    component: 'InputNumber',
  },
  {
    label: '存储条件',
    field: 'storageConditions',
    component: 'Input',
  },
  {
    label: '安全阈值',
    field: 'safetyThreshold',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  goodsCode: {title: '料品编码',order: 0,view: 'text', type: 'string',},
  goodsName: {title: '料品名称',order: 1,view: 'text', type: 'string',},
  goodsType: {title: '料品类别',order: 2,view: 'text', type: 'string',},
  gauge: {title: '规格',order: 3,view: 'text', type: 'string',},
  unit: {title: '单位',order: 4,view: 'text', type: 'string',},
  taxPrice: {title: '含税单价',order: 5,view: 'number', type: 'number',},
  notTaxPrice: {title: '不含税单价',order: 6,view: 'number', type: 'number',},
  lowTaxPrice: {title: '最低含税价',order: 7,view: 'number', type: 'number',},
  highTaxPrice: {title: '最高含税价',order: 8,view: 'number', type: 'number',},
  period: {title: '保质期',order: 9,view: 'number', type: 'number',},
  partNumber: {title: '零件号',order: 10,view: 'text', type: 'string',},
  brand: {title: '品牌',order: 11,view: 'text', type: 'string',},
  materialMan: {title: '领料员',order: 12,view: 'text', type: 'string',},
  suitableType: {title: '适用车型',order: 13,view: 'text', type: 'string',},
  assemblyType: {title: 'assemblyType',order: 14,view: 'text', type: 'string',},
  supplierCode: {title: '供货商编码',order: 15,view: 'text', type: 'string',},
  manufacturer: {title: '生产产商',order: 16,view: 'text', type: 'string',},
  serviceDays: {title: '送达天数',order: 17,view: 'number', type: 'number',},
  warningDays: {title: '预警天数',order: 18,view: 'number', type: 'number',},
  maximumUse: {title: '最大领用',order: 19,view: 'number', type: 'number',},
  isContractMerchant: {title: '是否合同商家',order: 20,view: 'text', type: 'string',},
  executionMode: {title: '执行方式',order: 21,view: 'text', type: 'string',},
  useMark: {title: '是否正常',order: 22,view: 'text', type: 'string',},
  handOld: {title: '是否交旧件',order: 23,view: 'text', type: 'string',},
  barCodeType: {title: '条码类型',order: 24,view: 'text', type: 'string',},
  remark: {title: '备注',order: 25,view: 'text', type: 'string',},
  registrationDate: {title: '注册日期时间',order: 26,view: 'datetime', type: 'string',},
  helpCode: {title: '助记码',order: 27,view: 'text', type: 'string',},
  inputdate: {title: '录入日期',order: 28,view: 'datetime', type: 'string',},
  material: {title: '材质',order: 29,view: 'text', type: 'string',},
  operatorName: {title: '操作员',order: 30,view: 'text', type: 'string',},
  barCode: {title: '条码',order: 31,view: 'text', type: 'string',},
  fitMeId: {title: '识别id',order: 32,view: 'number', type: 'number',},
  storageConditions: {title: '存储条件',order: 33,view: 'text', type: 'string',},
  safetyThreshold: {title: '安全阈值',order: 34,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
